package org.example.protocol;


import org.example.domain.po.PingMessagePO;
import org.example.domain.po.RpcRequestMessagePO;

/**
 * @description:
 * @author: feixiang.li
 * @date: 2025-01-03 14:55
 */
public class Test {
    public static void main(String[] args) {
        RpcRequestMessagePO pingMessagePO = new RpcRequestMessagePO(
                1, "org.example.service.HelloService", "sayHello", String.class, new Class[]{String.class}, new Object[]{"feixiang"}
        );
        pingMessagePO.setSequenceId(1);
        byte[] serialize = Algorithm.getByValue(1).serialize(pingMessagePO);
        System.out.println(serialize.length);
        RpcRequestMessagePO deserialize = Algorithm.getByValue(1).deserialize(serialize, RpcRequestMessagePO.class);
        System.out.println(deserialize);
    }
}
